import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: GodK
 * Date: 2024-08-28
 * Time: 17:34
 */
public class Test {
    public static void main(String[] args) {
        Solution solution = new Solution();
//        ListNode list = new ListNode(1);
//        ListNode head = list;
//        int n = 5;
//        for(int i = 2;i <= n;i++){
//            list.next = new ListNode(i);
//            list = list.next;
//        }
//        solution.reverseKGroup(head,2);
/*        int[] arr = {2, 5, 5, 11};
        solution.twoSum(arr,10);*/
        //System.out.println(solution.CheckPermutation("abc","bad"));

        //System.out.println(solution.longestCommonPrefix(new String[]{"aaa", "aa", "aaa"}));
        //System.out.println(solution.longestPalindrome("aaaa"));
        //System.out.println(solution.multiply("1231","0"));
//        String[] str = {"glarko","zlfiwwb","nsfspyox","pwqvwmlgri","qggx","qrkgmliewc","zskaqzwo","zskaqzwo",
//                "ijy","htpvnmozay","jqrlad","ccjel","qrkgmliewc","qkjzgws","fqizrrnmif","jqrlad","nbuorw",
//                "qrkgmliewc","htpvnmozay","nftk","glarko","hdemkfr","axyak","hdemkfr","nsfspyox","nsfspyox"
//                ,"qrkgmliewc","nftk","nftk","ccjel","qrkgmliewc","ocgjsu","ijy","glarko","nbuorw","nsfspyox"
//                ,"qkjzgws","qkjzgws","fqizrrnmif","pwqvwmlgri","nftk","qrkgmliewc","jqrlad","nftk","zskaqzwo"
//                ,"glarko","nsfspyox","zlfiwwb","hwlvqgkdbo","htpvnmozay","nsfspyox","zskaqzwo","htpvnmozay"
//                ,"zskaqzwo","nbuorw","qkjzgws","zlfiwwb","pwqvwmlgri","zskaqzwo","qengse","glarko","qkjzgws"
//                ,"pwqvwmlgri","fqizrrnmif","nbuorw","nftk","ijy","hdemkfr","nftk","qkjzgws","jqrlad","nftk"
//                ,"ccjel","qggx","ijy","qengse","nftk","htpvnmozay","qengse","eonrg","qengse","fqizrrnmif"
//                ,"hwlvqgkdbo","qengse","qengse","qggx","qkjzgws","qggx","pwqvwmlgri","htpvnmozay","qrkgmliewc"
//                ,"qengse","fqizrrnmif","qkjzgws","qengse","nftk","htpvnmozay","qggx","zlfiwwb","bwp","ocgjsu"
//                ,"qrkgmliewc","ccjel","hdemkfr","nsfspyox","hdemkfr","qggx","zlfiwwb","nsfspyox","ijy","qkjzgws"
//                ,"fqizrrnmif","qkjzgws","qrkgmliewc","glarko","hdemkfr","pwqvwmlgri"};
        //System.out.println(solution.decodeString("100[leetcode]"));
        //System.out.println(solution.topKFrequent(str,14));
        //System.out.println(solution.minMutation("AACCGGTT","AACCGGTA",new String[]{"AACCGGTA"}));
//        List<String> list = new ArrayList<>();
//        String[] str = {"hot","dot","dog","lot","log","cog"};
//        for(String s : str)list.add(s);
        //PriorityQueue<Integer> q = new PriorityQueue<>();
        //PriorityQueue<Integer> q = new PriorityQueue<>((a,b) -> b - a);
//        for(int i = 0;i < 5;i++)q.add(i);
//        for(int i : q) System.out.println(i);
//        int[] arr = {5, 6, 4, 3, 2, 1};
// /*       for(int i = 0;i < 5;i++) {
//            q.add(i);
//            if(q.size() > 3)q.poll();
//        }*/
//        for(int i : arr){
//            q.add(i);
//            if(q.size() > 3)q.poll();
//        }
//        for(int i : q) System.out.println(i);
        //System.out.println(solution.alienOrder(new String[]{"z","x"}));
        //System.out.println(solution.lemonadeChange(new int[]{5,5,5,5,20,20,5,5,20,5}));
        //System.out.println(solution.sortPeople(new String[]{"Mary","John","Emma"},new int[]{180,165,170}));
        //System.out.println(new StringBuilder(1).toString());
        //System.out.println(new StringBuilder(1).toString());
        System.out.println(solution.maxSumDivThree(new int[]{4}));
    }
}
